﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using csvmb.contracts;
using csvmb.contracts.datacontracts;
using csvmb.contracts.infrastructure;
using csvmb.csvadapter;
using csvmb.csvwerk;
using csvmb.gui;
using ebcpatterns;

namespace csvmb.app
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main(string[] args)
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            var gui = new Gui();

            new Mainboard(
                    gui, 
                    new Datei_oeffnen(
                        new Map<Tuple<string,int>, string>(),
                        new Header_bestimmen(
                                new Erste_Zeile_lesen(), 
                                new Spaltennamen_bestimmen()),
                        new Datensaetze_lesen(
                                new Zeilen_lesen_ab_Zeile_2(), 
                                new Datensaetze_erstellen()),
                        new Join<IEnumerable<string>,IEnumerable<Datensatz>, Ausschnitt>())
            );

            ((IEntryPoint)gui).Run(args);
        }
    }
}
